package com.leo.model;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;

/**
 * @ClassName Message
 * @Description
 * @Author wangss
 * @date 2021.11.26 21:55
 * @Version 1.0
 */
public class Message {

    private String from;

    private String to;

    private String text;

    // 发送时间
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date date;

    public Message() {
    }

    public Message(String from, String to, String text, Date date) {
        this.from = from;
        this.to = to;
        this.text = text;
        this.date = date;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getTo() {
        return to;
    }

    public void setTo(String to) {
        this.to = to;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }
}
